{extend name='admin@main'}

{block name="button"}

{if auth("product_index")}
<a data-dbclick class="layui-btn layui-btn-sm layui-btn-normal" data-open='{:url("wh_purchase/index")}?ware_house_id={$ware_house_id}&back=1'>前去采购</a>
{/if}

{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='wh_product/index_search'}
    <table class="layui-table" lay-skin="line">
        {notempty name='list'}
        <thead>
            <tr>
                <th class='text-center nowrap'>名称</th>
                <th class='text-center nowrap'>规格</th>
                <th class='text-center nowrap'>单价</th>
                <th class='text-center nowrap'>库存</th>
            </tr>
        </thead>
        {/notempty}
        <tbody>
            {foreach $list as $key=>$vo}
            <tr data-dbclick>
                <td class='text-center nowrap'>{$vo.name|default=''}</td>
                <td class='text-center nowrap'>{$vo.sku|default='-'}</td>
                <td class='text-center nowrap'>{$vo.price|default='-'}</td>
                <td class='text-center nowrap'>{$vo.count|default='-'}</td>
            </tr>
            {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>
{/block}